#include <iostream>
#include <string>
using namespace std;


void SWAP(float *ptr_x, float *ptr_y)
{
	float temp = *ptr_x;
	*ptr_x = *ptr_y;
	*ptr_y = temp;
}

void SWAP(float &x, float &y)
{
	float temp;
	temp = x;
	x = y;
	y = temp;
}

void SWAP(string &x, string &y)
{
	string temp;
	temp = x;
	x = y;
	y = temp;
}


int main()
{
	float x, y;
	x = 2;
	y = 37;
	cout << "x= " << x << endl << "y= " << y << endl << endl;
	SWAP(&x, &y);
	cout << "x= " << x << endl << "y= " << y << endl << endl;
	SWAP(x, y);
	cout << "x= " << x << endl << "y= " << y << endl << endl;

	string a, b;
	a = "Segel";
	b = "Suger";
	cout << "a= " << a << endl << "b= " << b << endl << endl;
	SWAP(a, b);
	cout << "a= " << a << endl << "b= " << b << endl << endl;

	cin.get();
	return 0;
}